//
//  CQTagAddCollectionViewCell.m
//  AllScrollViewDemo
//
//  Created by ciyouzen on 2016/06/07.
//  Copyright © 2016年 dvlproad. All rights reserved.
//

#import "CQTagAddCollectionViewCell.h"
#import <Masonry/Masonry.h>

@interface CQTagAddCollectionViewCell () {
    
}

@end

@implementation CQTagAddCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self setupViews];
    }
    return self;
}

- (void)setupViews {
    self.backgroundColor = [UIColor orangeColor];
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    [self addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.equalTo(@20);
        make.height.equalTo(@20);
        make.left.equalTo(self.contentView).offset(2);
        make.centerY.equalTo(self.contentView);
    }];
    
    UILabel *textLabel = [[UILabel alloc] init];
    textLabel.textAlignment = NSTextAlignmentCenter;
    textLabel.font = [UIFont systemFontOfSize:14.0];
    textLabel.text = NSLocalizedString(@"自定义", nil);
    textLabel.layer.cornerRadius = 10;
    [self.contentView addSubview:textLabel];
    [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(imageView.mas_right).offset(2);
        make.right.equalTo(self.contentView).offset(2);
        make.top.equalTo(self.contentView).offset(2);
        make.centerY.equalTo(self.contentView);
    }];
}


@end
